@echo off

if "%BASEPATH%" == "" (
   if "%1"=="" (
      set BASEPATH=.
   ) else (
      set BASEPATH=%1
   )
)

javac -Xlint:unchecked -d %BASEPATH%\..\..\build -classpath %J2EE_HOME%\lib\j2ee.jar;%BASEPATH%\..\..\lib\maila-bin.jar;%BASEPATH% %BASEPATH%\ru\arriah\servicedesk\web\client\action\*.java %BASEPATH%\ru\arriah\servicedesk\web\client\*.java

call jspc -trimSpaces -d %BASEPATH%\..\..\build -classpath %BASEPATH% -webapp %BASEPATH%\ru\arriah\servicedesk\web\client\jsp -p ru.arriah.servicedesk.web.client.jsp -mapped -compile

native2ascii -encoding Cp1251 %BASEPATH%\ru\arriah\servicedesk\config_ru.Cp1251.properties > %BASEPATH%\..\..\build\ru\arriah\servicedesk\config.properties